@extends('admin.layout.common')
@section('content')
    <link rel="stylesheet" href="{{url('/css/finance/FinancialAccountingCenter.css')}}">
    <div class="content">
        <h1 class="h1">财务记账中心</h1>
        <!-- 公共结束 -->
        <div class="center_box">
            <form action="{{url('/admin/costStatisticsCheck')}}">
                <input type="hidden" name="year" value="{{$_GET['year']}}">
                <label for="">选择月份：</label>
                <select name="month" id="">
                    @foreach($data['monthSearch'] as $v)
                        <option value="{{$v->month}}" @if($v->month == $data['selected']) selected @endif>{{$v->month}}</option>
                    @endforeach
                </select>
                <button type="submit" value="查看" class="chakan">查看</button>
            </form>
            <table border="1" style="width:80%;">
                <h1 class="h1 chengben">当月累计成本：<span>{{$data['total']}}</span>元</h1>
                <tr>
                    <th>成本ID</th>
                    <th>成本类型</th>
                    <th>成本金额</th>
                    <th>成本月份</th>
                    <th>备注</th>
                </tr>
                @foreach($data['data'] as $v)
                <tr>
                    <td>{{$v->id}}</td>
                    <td>
                        @switch($v->type)
                            @case(0)
                                固定成本
                            @break

                            @case(1)
                                其他成本
                            @break
                        @endswitch
                    </td>
                    <td>{{$v->amount}}</td>
                    <td>{{$v->date}}</td>
                    <td>{{$v->remark}}</td>
                </tr>
                @endforeach
            </table>
        </div>
    </div>
@endsection